package com.slipper.core.database;

import com.slipper.core.database.support.MysqlResolver;
import com.slipper.core.database.support.PostgresqlResolver;
import com.slipper.core.database.support.SqlserverResolver;
import static com.slipper.constants.Constants.Database.*;

import java.util.HashMap;
import java.util.Map;

public class ResolverFactory {
    public static Map<String, IResolver> resolverMap = new HashMap<>() {{
        put(MYSQL, new MysqlResolver());
        put(POSTGRESQL, new PostgresqlResolver());
        put(SQLSERVER, new SqlserverResolver());
    }};

    public static IResolver getResolver(String dbType) {
        return resolverMap.get(dbType.toLowerCase());
    }
}
